<?php
use yii\helpers\Html;
use yii\bootstrap\ActiveForm;

/* @var $this yii\web\View */
/* @var $form yii\bootstrap\ActiveForm */
/* @var $model \common\models\LoginForm */

$this->title = '注册';

$fieldOptions1 = [
    'options' => ['class' => 'form-group has-feedback'],
    'inputTemplate' => "{input}<span class='glyphicon glyphicon-user form-control-feedback'></span>"
];

$fieldOptions2 = [
    'options' => ['class' => 'form-group has-feedback'],
    'inputTemplate' => "{input}<span class='glyphicon glyphicon-lock form-control-feedback'></span>"
];

$fieldOptions3 = [
    'options' => ['class' => 'form-group has-feedback'],
    'inputTemplate' => "{input}<span class='glyphicon glyphicon-align-left form-control-feedback'></span>"
];
?>

<div class="login-box">
    <div class="login-logo" style="margin: 0 0 20px 0;padding-top: 30px;">
            <img src="../images/logo.png" width="50%" />
    </div>
    <!-- /.login-logo -->
    <div class="login-box-body">

        <?php $form = ActiveForm::begin(['id' => 'reg-form', 'enableClientValidation' => false]); ?>

        <?= $form
            ->field($model, 'username', $fieldOptions1)
            ->label(false)
            ->textInput(['placeholder' => Yii::t('app', 'Username')]) ?>

        <?= $form
            ->field($model, 'password', $fieldOptions2)
            ->label(false)
            ->passwordInput(['placeholder' => '登录密码']) ?>

        <?= $form
            ->field($model, 'rePassword', $fieldOptions2)
            ->label(false)
            ->passwordInput(['placeholder' => '确认密码']) ?>
        <hr>

        <?= $form
            ->field($model, 'city', $fieldOptions3)
            ->label(false)
            ->textInput(['placeholder' => '城市']) ?>

        <?= $form
            ->field($model, 'store_name', $fieldOptions3)
            ->label(false)
            ->textInput(['placeholder' => '经销商名称']) ?>

        <div class="row" style="padding: 15px">
            <?= Html::submitButton('注册', ['class' => 'btn btn-success btn-block btn-flat', 'name' => 'reg-button']) ?>
        </div>


        <?php ActiveForm::end(); ?>



    </div>

    <div class="text-center">
        <div style="height: 30px;"></div>
        <?= Html::a('去登录 >', 'login', ['style'=>"color:#000; font-size:12px;"])?>
    </div>
    <!-- /.login-box-body -->
</div><!-- /.login-box -->


